//
//  ExtensionUIView.h
//  LetvIphoneClient
//
//  Created by guangliang shen on 1/17/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>

#ifndef LT_MERGE_FROM_IPAD_CLIENT
@interface UIView (SubView)
-(void)removeSubViews;
+(UIView *) getViewByClassName:(UIView *)parentView withClassName:(NSString *)className;
- (void)hide:(BOOL)bHide
    animated:(BOOL)bAniamtion
    alphaMax:(CGFloat)alphaMax
    duration:(NSTimeInterval)duration;

+(void)addLineToControl:(UIView *)view forTopOrBottom:(BOOL)isTop WithColorRed:(CGFloat)red WithColorGreen:(CGFloat)green WithColorBlue:(CGFloat)blue withAlpha:(CGFloat)alpha;

+(void)addVerticalLine:(UIView *)view forLeftOrRight:(BOOL)isLeft  WithColorRed:(CGFloat)red WithColorGreen:(CGFloat)green WithColorBlue:(CGFloat)blue withAlpha:(CGFloat)alpha;

+(void)addLineToControl2:(UIView *)view forTopOrBottom:(BOOL)isTop WithColorRed:(CGFloat)red WithColorGreen:(CGFloat)green WithColorBlue:(CGFloat)blue withAlpha:(CGFloat)alpha;

+(void)addLineToControl3:(UIView *)view forTopOrBottom:(BOOL)isTop xSpace:(float)xSpace leftColor:(UIColor *)leftColor leftLength:(float)leftLength rightColor:(UIColor *)rightColor rightLength:(float)rightLength;

+(void)exChangeOut:(UIView *)changeOutView dur:(CFTimeInterval)dur;

+(void)scaleView:(UIView *)view AnimationWithDuration:(NSTimeInterval)duration  isSelect:(BOOL)isSelect  completion:(void (^)(BOOL finished))completion;
- (void)setCustomLayoutWithVisualFormat1:(NSString *)format1
                                 Format2:(NSString *)format2
                                 metrics:(NSDictionary *)metrics
                               superView:(UIView *)superView;
- (void)setCustomLayoutWithVisualFormat1:(NSString *)format1
                                 Format2:(NSString *)format2
                                 metrics:(NSDictionary *)metrics
                               superView:(UIView *)superView
                                   frame:(CGRect)frame;
// 图片背景
- (void)addBackGroudImage:(UIImage *)image;
- (void)addBackGroudImageAtCenter:(UIImage *)image;

+ (UIImage *)roundedImageWithSize:(CGSize)size color:(UIColor *)color radius:(CGFloat)radius ;
- (CGRect)getNewFrameFromOldFrame:(CGRect)oldFrame;
- (NSDictionary *)getFrameFromView;

@end
#else
@interface UIView (SubView)
-(void)removeSubViews;
+(UIView *) getViewByClassName:(UIView *)parentView withClassName:(NSString *)className;
- (void)hide:(BOOL)bHide
    animated:(BOOL)bAniamtion
    alphaMax:(CGFloat)alphaMax
    duration:(NSTimeInterval)duration;

// 图片背景
- (void)addBackGroudImage:(UIImage *)image;
- (void)addBackGroudImageAtCenter:(UIImage *)image;

+(void)addLineToControl:(UIView *)view forTopOrBottom:(BOOL)isTop WithColorRed:(CGFloat)red WithColorGreen:(CGFloat)green WithColorBlue:(CGFloat)blue withAlpha:(CGFloat)alpha;
+(void)addVerticalLine:(UIView *)view forLeftOrRight:(BOOL)isLeft  WithColorRed:(CGFloat)red WithColorGreen:(CGFloat)green WithColorBlue:(CGFloat)blue withAlpha:(CGFloat)alpha;
- (void)set7Frame:(CGRect)frame;
@end


@interface UIView(LTWobble)
- (void)stopWobble;
- (void)startWobble;

+ (UIImage *)roundedImageWithSize:(CGSize)size color:(UIColor *)color radius:(CGFloat)radius ;

@end
#endif